# 1.字符串：很多字符连接在一起的串，
# 字符串需要用引号包起来，英文的单引号或者双引号
str1 = "你好"
str2 = '我好'

# 2.三个单引号或者双引号也可以
str3 = """你们好！大家好才好"""

# 3.三个引号可以创建跨行字符串，一个引号的写法则不能跨行
str4 = """你们好！

大家好才好"""

# 4.测试两个引号行不行,貌似不行
# str5 = ''abc''

print(str1, str2, str3, str4)

# 5.字符串内置方法
str_low_case = "ada lovelace"

print("*" * 50)
# ①首字母大写
print(str_low_case.title())

# ②.全部大写
upper = str_low_case.upper()
print(upper)

# ③.全部小写
lower = upper.lower()
print(lower)


# 6.f字符串：将多个字符串组合起来，{}代表占位符
print("*" * 50)
first_name = "Spider"
last_name = "man"

full_name = f"{first_name}{last_name}"
print(full_name)

print("*" * 50)
repeat_name = "德莱"
single_name = "文"
full_name = f"{repeat_name}{repeat_name}{repeat_name}{single_name}"
print(full_name)